﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<ReservaCancha.Models.Reserva>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	UPC
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Reservas</h2>

    <table>
        <tr>
            <th>
                Numero
            </th>
            <th>
                Sede
            </th>
            <th>
                Dia
            </th>
            <th>
                Hora
            </th>
            <th>
                Estado
            </th>
            <th></th>
        </tr>

    <% foreach (var item in Model) { %>
    
        <tr>
            <td>
                <%: item.Numero %>
            </td>
            <td>
                <%: item.Sede %>
            </td>
            <td>
                <%: item.Dia %>
            </td>
            <td>
                <%: item.Hora %>
            </td>
            <td>
                <%: item.Estado %>
            </td>
            <td>
                <%: Html.ActionLink("Validar", "Valid", new { id=item.Numero }) %> |
                <%: Html.ActionLink("Modificar", "Edit", new { id=item.Numero })%>
                <%: Html.ActionLink("Detalles", "Details", new { id=item.Numero })%> |
                <%: Html.ActionLink("Eliminar", "Delete", new { id=item.Numero })%>
            </td>
        </tr>
    
    <% } %>

    </table>

    <p>
        <%: Html.ActionLink("Generar", "Create") %>
    </p>

</asp:Content>
